import React,{Component} from 'react'
import {connect} from 'dva';
class User extends Component {
  constructor(props) {
    super(props)
  }
  componentDidMount() {
    console.log(this.props)
  }
  render() {
    return(
      <div>
        <span>
          userName: {this.props.user.userName}
        </span>
      </div>
    )
  }
}
export default connect(({global}) => ({
    user: global.user
}))(User)